package com.atguigu.auth.controller;


import com.atguigu.auth.entity.Family;
import com.atguigu.auth.service.FamilyService;
import com.atguigu.auth.service.VoiceService;
import com.atguigu.common.result.Result;
import com.atguigu.common.utils.MD5;
import com.atguigu.model.system.SysUser;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

/**
 * <p>
 * 语音识别
 * </p>
 *
 * @author universe
 * @since 2024-03-17
 */
@Api(tags = "语音识别")
@RestController
@RequestMapping("/auth/voice")
public class VoiceController {
    @Autowired
    private VoiceService voiceService;

    @PostMapping("uploadWAVData")
    public Result save(@RequestParam("file") MultipartFile file) {
        String sentence = voiceService.Sentence(file);
        return Result.ok(sentence);
    }
}

